<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <button onclick="getM()">获取getMeg</button>
    <script>
        function getM(){
            $.ajax({
                url:"http://localhost:8080/getMsg",
                type:"get",
                success:function (data){
                    alert(data)
                }
            })
        }
    </script>
</body>
</html>